<template>
  <div class="songitemonly" v-if="songlist">
      
    <li v-for="(item, index) in songlist.tracks" :key="index">
      <img :src="item.al.picUrl" />
      <div class="left">
        <h5>{{ item.name }}</h5>
        <p>
          <span v-for="(arname, index) in item.ar" :key="index">
            {{ arname.name }}</span
          >
          - {{ item.al.name }}
        </p>
      </div>

      <div class="right">
        <img @click="$emit('play', item)" src="../assets/play.png" />
      </div>

    </li>
  </div>
</template>

<script>
// 图片跳转整个页面
export default {
  name: "SongItemOnly",
  props: {
    songlist: Object,
  },
  data() {
    return {};
  },
};
</script>

<style lang="less" scoped>
.songitemonly {
  li {
    height: 70px;
    margin: 0px 15px;
    border-bottom: 1px solid #d0d0d0;
    padding: 6px 0px;
    display: flex;
    img {
      height: 70px;
      width: 70px;
      border-radius: 10px;
    }
    .left {
      flex: 1;
      margin-left: 15px;
      line-height: 23px;
      padding: 13px 0px;
      overflow: hidden;
      h5,
      p {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
      }
      h5 {
        font-size: 19px;
        font-weight: 400;
      }
      p {
        font-size: 13px;
        color: #888;
        margin-top: 2px;
      }
    }
    .right {
      width: 25px;
      height: 25px;
      padding: 0px 14px;
      display: flex;
      img {
        width: 28px;
        height: 28px;
        margin-top: 21px;
      }
    }
  }
}
</style>